import Vue from 'vue'
import VueRouter from 'vue-router'
import Calendar from 'views/Calendar/Calendar'
import EventChange from 'views/Calendar/child/eventChange' 
import EventList from 'views/Calendar/child/eventList' 
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'/home'
  },
  {
    path: '/home',
    name: 'Home',
    component:()=>import('../views/Home/Home.vue')
  },
  {
    path: '/Calendar',
    name: 'Calendar',
    component:Calendar,
    redirect:'/eventList',
    children:[
      // {path:'/eventChange',component:_=>import('views/Calendar/child/eventChange') }
      {path:'/eventList',component:EventList, alias:['Calendar'] },
      {path:'/eventChange',component:EventChange ,alias:['Calendar'] }
    ]
  },
  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
